package com.openbravo.pos.ticket;

import com.openbravo.format.Formats;

public class TicketTaxInfo
{
  private TaxInfo tax;
  private double subtotal;
  private double taxtotal;

  public TicketTaxInfo(TaxInfo paramTaxInfo)
  {
    this.tax = paramTaxInfo;
    this.subtotal = 0.0D;
    this.taxtotal = 0.0D;
  }

  public TaxInfo getTaxInfo()
  {
    return this.tax;
  }

  public void add(double paramDouble)
  {
    this.subtotal += paramDouble;
    this.taxtotal = (this.subtotal * this.tax.getRate());
  }

  public double getSubTotal()
  {
    return this.subtotal;
  }

  public double getTax()
  {
    return this.taxtotal;
  }

  public double getTotal()
  {
    return this.subtotal + this.taxtotal;
  }

  public String printSubTotal()
  {
    return Formats.CURRENCY.formatValue(new Double(getSubTotal()));
  }

  public String printTax()
  {
    return Formats.CURRENCY.formatValue(new Double(getTax()));
  }

  public String printTotal()
  {
    return Formats.CURRENCY.formatValue(new Double(getTotal()));
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.ticket.TicketTaxInfo
 * JD-Core Version:    0.6.0
 */